package android.slc.fast.vd.wrapper;

import android.slc.box.or.OnResultsListener;
import android.slc.adapter.LoadMoreDataFormat3;
import android.slc.adapter.PageModel;

/**
 * @Description:
 * @Author: sunlunchang
 * @CreateDate: 2022/10/13 上午 10:25
 */
public abstract class BaseListPageWrapper<T> extends BaseListCommonWrapper<PageModel<T>> implements IBaseListPageWrapper<T> {
    public final LoadMoreDataFormat3 loadMoreDataFormat3 = new LoadMoreDataFormat3();

    public BaseListPageWrapper(OnResultsListener<PageModel<T>> onResultsListener) {
        super(onResultsListener);
    }

    @Override
    public LoadMoreDataFormat3 getLoadMoreDataFormat3() {
        return loadMoreDataFormat3;
    }

    public void refresh() {
        loadMoreDataFormat3.refresh();
        loadMore();
    }

    @Override
    public final void loadMore() {
        getLoadMoreDataFormat3().startLoadMoreEnd();
        onLoadMore();
    }

    public abstract void onLoadMore();

}
